package com.liuyi.netty.im.lychat.modular.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.liuyi.netty.im.lychat.modular.enums.SessionType;
import com.liuyi.rapid.develop.mybatis.plus.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 聊天会话表
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-12-29
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_chat_session")
@ApiModel(value="ChatSession对象", description="聊天会话表")
public class ChatSession extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "逻辑删除，1未删除，时间戳删除")
    private Long del;

    @ApiModelProperty(value = "所属人")
    private String userId;

    @ApiModelProperty(value = "对方id")
    private String toId;

    @ApiModelProperty(value = "会话id")
    private String sessionId;

    @ApiModelProperty(value = "会话类型")
    private SessionType sessionType;


    public static final String ID = "id";

    public static final String DEL = "del";

    public static final String USER_ID = "user_id";

    public static final String TO_ID = "to_id";

    public static final String SESSION_ID = "session_id";

    public static final String SESSION_TYPE = "session_type";

}
